import fetch from 'common/src/utils/fetch';

/**
 *新增
 */
function add(data) {
    return fetch({
        url: '/api/electionservice/graduateApply/addGraduateApply',
        method: 'post',
        data: data
    });
}

/**
 *审核
 */
function examine(data, status, aduitOpinions) {
    return fetch({
        url:
            '/api/electionservice/graduateApply/examineGraduateApply?status=' +
            status + '&aduitOpinions=' + encodeURI(aduitOpinions),
        method: 'post',
        data: data
    });
}

/**
 *补缓考  学生下拉框
 */
function applyStudentList(data) {
    return fetch({
        url: '/api/electionservice/graduateApply/applyStudentList',
        method: 'post',
        data: data
    });
}

/**
 *补缓考  课程下拉框
 */
function applyCourseList(data) {
    return fetch({
        url: '/api/electionservice/graduateApply/applyCourseList',
        method: 'post',
        data: data
    });
}

/**
 *撤回申请
 */
function withdrawnGraduateApply(data) {
  return fetch({
    url: '/api/electionservice/graduateApply/withdrawnGraduateApply',
    method: 'post',
    data: data
  });
}

const pageUrl = '/api/electionservice/graduateApply/listGraduateApply';

export default {
    add: add,
    examine: examine,
    applyStudentList: applyStudentList,
    applyCourseList: applyCourseList,
    withdrawnGraduateApply: withdrawnGraduateApply,
    pageUrl: pageUrl
};
